<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>智能面试助手</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/default.min.css">
    <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js"></script>

    <script>
        hljs.highlightAll();
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CFC9',
                        neutral: '#F2F3F5',
                        dark: '#1D2129',
                        light: '#FFFFFF',
                        'neutral-dark': '#4E5969',
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                    boxShadow: {
                        'chat': '0 2px 14px 0 rgba(0, 0, 0, 0.06)',
                        'input': '0 1px 4px 0 rgba(0, 0, 0, 0.08)',
                    }
                },
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .typing-indicator {
                display: inline-flex;
                align-items: center;
                gap: 3px;
            }
            .typing-indicator span {
                height: 5px;
                width: 5px;
                margin: 0 1px;
                background-color: #9e9ea7;
                border-radius: 50%;
                display: inline-block;
                animation: typing-bounce 1.4s infinite ease-in-out both;
            }
            .typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
            .typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
        }

        @keyframes typing-bounce {
            0%, 80%, 100% { transform: scale(0); }
            40% { transform: scale(1); }
        }

        /* Markdown渲染样式 */
        .markdown-output h1, .markdown-output h2, .markdown-output h3, .markdown-output h4, .markdown-output h5, .markdown-output h6 {
            margin-top: 1.5rem;
            margin-bottom: 0.75rem;
            font-weight: 600;
        }

        .markdown-output h1 {
            font-size: 1.5rem;
            border-bottom: 1px solid #e5e7eb;
            padding-bottom: 0.3rem;
        }

        .markdown-output h2 {
            font-size: 1.25rem;
            border-bottom: 1px solid #e5e7eb;
            padding-bottom: 0.3rem;
        }

        .markdown-output h3 {
            font-size: 1.1rem;
        }

        .markdown-output p {
            margin-bottom: 1rem;
        }

        .markdown-output ul, .markdown-output ol {
            margin-left: 1.5rem;
            margin-bottom: 1rem;
        }

        .markdown-output ul {
            list-style-type: disc;
        }

        .markdown-output ol {
            list-style-type: decimal;
        }

        .markdown-output li {
            margin-bottom: 0.5rem;
        }

        .markdown-output pre {
            margin-bottom: 1rem;
            border-radius: 0.375rem;
            overflow: auto;
        }

        .markdown-output code {
            font-family: Consolas, Monaco, 'Andale Mono', monospace;
            font-size: 0.9rem;
            border-radius: 0.25rem;
            padding: 0.1rem 0.3rem;
        }

        .markdown-output pre code {
            display: block;
            padding: 1rem;
            overflow-x: auto;
        }

        .markdown-output blockquote {
            border-left: 4px solid #e5e7eb;
            padding-left: 1rem;
            margin-left: 0;
            margin-bottom: 1rem;
            color: #6b7280;
        }

        .markdown-output a {
            color: #165DFF;
            text-decoration: underline;
        }

        .markdown-output img {
            max-width: 100%;
            height: auto;
            margin: 1rem 0;
            border-radius: 0.375rem;
        }
    </style>
</head>
<body class="bg-gray-50 font-inter text-dark min-h-screen flex flex-col">
<!-- 顶部导航栏 -->
<header class="bg-white shadow-sm sticky top-0 z-10">
    <div class="container mx-auto px-4 py-3 flex justify-between items-center">
        <div class="flex items-center space-x-2">
            <i class="fa fa-graduation-cap text-primary text-2xl"></i>
            <h1 class="text-xl font-bold text-neutral-700">面试助手</h1>
        </div>
        <nav>
            <ul class="flex space-x-6">
                <li><a href="/view/quesList.html" class="text-neutral-600 hover:text-primary transition-colors"><i
                        class="fa fa-list-alt mr-1"></i>我的题库</a></li>
                <li><a href="/view/chicken.html" class="text-primary font-medium border-b-2 border-primary pb-1"><i
                        class="fa fa-home mr-1"></i>我的小助手</a></li>
                <li><a href="/view/userInfo.html" class="text-neutral-600 hover:text-primary transition-colors"><i
                        class="fa fa-cog mr-1"></i>个人主页</a></li>
            </ul>
        </nav>
    </div>
</header>

<main class="flex-1 container mx-auto px-4 py-6 flex flex-col">
    <div id="chat-container" class="flex-1 overflow-y-auto mb-4 bg-white rounded-xl shadow-chat p-4 scrollbar-hide">
        <div class="flex items-start mb-6">
            <div class="bg-primary text-white h-8 w-8 rounded-lg flex items-center justify-center flex-shrink-0 mt-1">
                <i class="fa fa-robot"></i>
            </div>
            <div class="ml-3 bg-neutral rounded-xl rounded-tl-none p-4 max-w-[90%]">
                <div class="markdown-output">
                    <p>你好！我是你的面试助手！我叫面试鸡！有什么我可以帮助你的吗？</p>
                </div>
            </div>
        </div>
    </div>

    <div class="bg-white rounded-xl shadow-input p-4 relative">
        <div class="flex">
            <textarea
                    id="user-input"
                    placeholder="输入你的问题..."
                    class="flex-1 resize-none border-0 focus:ring-0 focus:outline-none bg-transparent pr-10"
                    rows="1"></textarea>
            <button
                    id="send-button"
                    class="bg-primary hover:bg-primary/90 text-white rounded-lg px-4 py-2 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center"
                    disabled>
                <i class="fa fa-paper-plane"></i>
            </button>
        </div>
        <div class="absolute bottom-3 right-3 text-xs text-gray-400">
            <span id="char-count">0</span>/2000
        </div>
    </div>
</main>

<footer class="bg-white border-t border-gray-200 py-3">
    <div class="container mx-auto px-4 text-center text-sm text-neutral-dark">
        <p>© 2025 AI对话助手 | 保护你的隐私是我们的首要任务</p>
    </div>
</footer>

<script src="../js/chicken.js"></script>
</body>
</html>